import currentPageObj from './currentPageObj'
export default (blackList=[]) => {
	blackList.push('tranSource','shareKrtNo','tranRootUuid','tranPuuid','tranLevel');
	var obj = currentPageObj()
	var currentPage = obj.currentPage; //获取某页面的对象
	var pageUrl = obj.pageUrl;

	var options = {};
	// #ifdef H5
	options = currentPage.$route.query;
	// #endif
	// #ifdef MP-WEIXIN
	options = currentPage.options
	// #endif
	// #ifdef MP-ALIPAY
	options = currentPage.$vm.$mp.query
	// #endif
	
	var params = '?',
		keyvalPair = '';
	for (var k in options) {
		if(blackList.indexOf(k) === -1){
			keyvalPair = k + '=' + options[k]
			if (params === '?') {
				params += keyvalPair
			} else {
				params += ('&' + keyvalPair)
			}
		}
	}
	if (params === '?') {
		params = ''
	}
	console.log('当前路径是', '/' + pageUrl + params)
	return '/' + pageUrl + params
}